package com.example.demo.thread;

public class Demo1 {

    public static class MyThread implements Runnable {
        @Override
        public void run() {
            System.out.println("11111");
        }
    }

    public static void main(String[] args) {
        new Thread(new MyThread()).start();

        //java 函数式编程写法
        new Thread(()->{
            System.out.println("222222");
        }).start();
    }
}
